package main

import "fmt"

func main() {
	s1 := "big"
	//强制类型转换
	byteStr := []byte(s1)
	byteStr[0] = 'p'
	s1 = string(byteStr)

	fmt.Println(s1)

	//字符转换（汉字）
	s2 := "你好golang"
	runeStr := []rune(s2)
	fmt.Println(runeStr) //汉字对应编码[20320 22909 103 111 108 97 110 103]
	runeStr[0] = '大'
	s2 = string(runeStr)
	fmt.Println(s2)

	s2 = "xx好golang"
	fmt.Println(s2)
}
